package com.ljc.api;

import com.ljc.entity.Danmu;
import com.ljc.interfaces.DanmuApi;
import com.ljc.mapper.DanmuMapper;
import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@DubboService
public class DanmuApiImpl implements DanmuApi {
    @Resource
    private DanmuMapper danmuMapper;

    /**
     * 添加弹幕
     */
    @Override
    public void addDanmu(Danmu danmu) {
        danmuMapper.addDanmu(danmu);
    }

    /**
     * 获得弹幕列表
     */
    @Override
    public List<Danmu> getDanmus(Map<String, Object> params) {
        return danmuMapper.getDanmus(params);
    }
}
